var e = function(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}(require("config.js")), t = e.default.getDomain, r = e.default.getPageCount, n = e.default.getCategoriesID, o = e.default.getIndexListType, s = "https://" + t + "/wp-json/wp/v2/", i = "https://" + t + "/wp-json/watch-life-net/v1/";

module.exports = {
    getPosts: function(e) {
        var t = s + "posts?per_page=" + r + "&orderby=date&order=desc&page=" + e.page;
        return 0 != e.categories ? t += "&categories=" + e.categories : "" != e.search ? t += "&search=" + encodeURIComponent(e.search) : "all" != o && (t += "&categories=" + o), 
        t;
    },
    getPostsByCategories: function(e) {
        return s + "posts?per_page=20&orderby=date&order=desc&page=1&categories=" + e;
    },
    getStickyPosts: function() {
        return s + "posts?sticky=true&per_page=5&page=1";
    },
    getSwiperPosts: function() {
        var e = i;
        return e += "post/swipe";
    },
    getEnableComment: function() {
        var e = i;
        return e += "options/enableComment";
    },
    getPostsByTags: function(e, t) {
        return s + "posts?per_page=5&&page=1&exclude=" + e + "&tags=" + t;
    },
    getPostsByIDs: function(e) {
        return s + "posts?include=" + e;
    },
    getPostBySlug: function(e) {
        return s + "posts?slug=" + e;
    },
    getPostByID: function(e) {
        return s + "posts/" + e;
    },
    getPages: function() {
        return s + "pages";
    },
    getPageByID: function(e, t) {
        return s + "pages/" + e;
    },
    getCategories: function() {
        return "all" == n ? s + "categories?per_page=100&orderby=count&order=desc" : s + "categories?include=" + n + "&orderby=count&order=desc";
    },
    getCategoryByID: function(e) {
        return s + "categories/" + e;
    },
    getComments: function(e) {
        return s + "comments?per_page=100&orderby=date&order=asc&post=" + e.postID + "&page=" + e.page;
    },
    getCommentsReplay: function(e) {
        var t = i;
        return t += "comment/getcomments?postid=" + e.postId + "&limit=" + e.limit + "&page=" + e.page + "&order=desc";
    },
    getNewComments: function() {
        return s + "comments?parent=0&per_page=20&orderby=date&order=desc";
    },
    getChildrenComments: function(e) {
        return s + "comments?parent_exclude=0&per_page=100&orderby=date&order=desc&post=" + e.postID;
    },
    getRecentfiftyComments: function() {
        return s + "comments?per_page=30&orderby=date&order=desc";
    },
    postComment: function() {
        return s + "comments";
    },
    postWeixinComment: function() {
        return i + "comment/add";
    },
    getWeixinComment: function(e) {
        return i + "comment/get?openid=" + e;
    },
    getContentFirstImage: function(e) {
        var t = /<img.*?src=[\'"](.*?)[\'"].*?>/i.exec(e), r = "../../images/logo700.png";
        return t && (r = t[1]), r;
    },
    getTopHotPosts: function(e) {
        var t = i;
        return 1 == e ? t += "post/hotpostthisyear" : 2 == e ? t += "post/pageviewsthisyear" : 3 == e ? t += "post/likethisyear" : 4 == e && (t += "post/praisethisyear"), 
        t;
    },
    updatePageviews: function(e) {
        var t = i;
        return t += "post/addpageview/" + e;
    },
    getOpenidUrl: function(e) {
        var t = i;
        return t += "weixin/getopenid";
    },
    postLikeUrl: function() {
        var e = i;
        return e += "post/like";
    },
    postIsLikeUrl: function() {
        var e = i;
        return e += "post/islike";
    },
    getMyLikeUrl: function(e) {
        var t = i;
        return t += "post/mylike?openid=" + e;
    },
    sendMessagesUrl: function() {
        var e = i;
        return e += "weixin/sendmessage";
    },
    getSubscription: function() {
        var e = i;
        return e += "category/getsubscription";
    },
    postSubscription: function() {
        var e = i;
        return e += "category/postsubscription";
    },
    delSubscription: function() {
        var e = i;
        return e += "category/delSubscription";
    },
    creatPoster: function() {
        var e = i;
        return e += "weixin/qrcodeimg";
    },
    getPosterUrl: function() {
        return "https://" + t + "/wp-content/plugins/wp-rest-api-for-app/poster/";
    },
    getPosterQrcodeUrl: function() {
        return "https://" + t + "/wp-content/plugins/wp-rest-api-for-app/qrcode/";
    }
};